{
  "properties" : { },
  "id" : "a22ffac6c1e3406caf198a695272e6a8",
  "script" : null,
  "groupId" : "12d38fe3153b455b861ea6a35e8b9fc8",
  "name" : "T-002-截图",
  "createTime" : null,
  "updateTime" : 1714329978314,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "管理员",
  "path" : "002",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import org.openqa.selenium.edge.EdgeDriver
import org.openqa.selenium.edge.EdgeOptions
import org.openqa.selenium.OutputType
import org.openqa.selenium.By
import org.openqa.selenium.Dimension
//import com.
import response

// 

System.setProperty("webdriver.edge.driver", "D:/opt/drive/msedgedriver/120.0.2210.144/msedgedriver.exe");
EdgeOptions options = new EdgeOptions();

EdgeDriver driver = new EdgeDriver(options);
driver.manage().window().setSize(new Dimension(1920, 1080));
var webImg;
try {
    driver.navigate().to("https://bing.com");

    WebElement element = driver.findElement(By.id("sb_form_q"));
    element.sendKeys("WebDriver");
    element.submit();

    Thread.sleep(5000);
    webImg = driver.getScreenshotAs(OutputType.BYTES);
} finally {
    driver.quit();
}
return response.image(webImg,'image/png');